package com.xuecheng.client.sdk.rsp;

import com.alibaba.fastjson.annotation.JSONField;
import com.xuecheng.client.sdk.enums.CodeEnums;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Objects;

/**
 * @author 程序员小魏
 * @create 2023-11-06 22:58
 * 客户端sdk响应类
 */
@Data
@Accessors(chain = true)
public class BaseSdkResponse {

    /**
     * json格式的字符串，响应报文
     */
    @JSONField(name = "result")
    private String data;
    /**
     * 状态码
     */
    private String code;
    /**
     * 详细消息
     */
    private String msg;

    public static BaseSdkResponse reqParamError(){
        return new BaseSdkResponse().setCode(CodeEnums.REQ_PARAM_ERROR.getCode()).setMsg(CodeEnums.REQ_PARAM_ERROR.getDesc());
    }
}
